<template>
  <div>
    <keep-alive>
      <router-view />
    </keep-alive>

    <van-tabbar
      v-model="active"
      :route="true"
      :placeholder="true"
      @change="changeHandle"
    >
      <van-tabbar-item icon="home-o" to="/home/index">首页</van-tabbar-item>
      <van-tabbar-item icon="friends-o" to="/home/community"
        >社区</van-tabbar-item
      >
      <van-tabbar-item icon="comment-o" to="/home/news">消息</van-tabbar-item>
      <van-tabbar-item icon="notes-o" to="/home/trip">行程</van-tabbar-item>
      <van-tabbar-item icon="user-o" to="/home/my">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
import { ref } from "vue";

export default {
  setup() {
    const active = ref(0);
    return { active };
  },
};
</script>
<style lang="less" scoped></style>
